package java69.work720;

public class Teacher3 extends Person3 {
    protected int id;
    protected int salary;
    protected String job;
    protected String department;

    public Teacher3() {
    }

    public Teacher3(String name, String sex, int age, int id, int salary, String job, String department) {
        super(name, sex, age);
        this.id = id;
        this.salary = salary;
        this.job = job;
        this.department = department;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getSalary() {
        return salary;
    }

    public void setSalary(int salary) {
        this.salary = salary;
    }

    public String getJob() {
        return job;
    }

    public void setJob(String job) {
        this.job = job;
    }

    public String getDepartment() {
        return department;
    }

    public void setDepartment(String department) {
        this.department = department;
    }
    @Override
    public String toString() {
        return "我叫"+super.getName()+",性别"+super.getSex()+",今年"+super.getAge()+
                "，工号为"+getId()+",薪水："+getSalary()+",职称是"+getJob()+",部门为"+getDepartment();
    }

    public static void main(String[] args) {
        Teacher3 teacher3 = new Teacher3("小明","男",21,32156,8541,"高级教师","理工");
        System.out.println(teacher3.toString());
    }
}
